<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      opencv-4.2.0
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;10.&nbsp;Graphics and Font Libraries
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="newt.html" title="newt-0.52.21">Prev</a>
          <p>
            newt-0.52.21
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="openjpeg2.html" title=
          "OpenJPEG-2.3.1">Next</a>
          <p>
            OpenJPEG-2.3.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="graphlib.html" title=
          "Chapter&nbsp;10.&nbsp;Graphics and Font Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="opencv" name="opencv"></a>opencv-4.2.0
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to opencv
        </h2>
        <p>
          The <span class="application">opencv</span> package contains
          graphics libraries mainly aimed at real-time computer vision.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://github.com/opencv/opencv/archive/4.2.0/opencv-4.2.0.tar.gz">
                https://github.com/opencv/opencv/archive/4.2.0/opencv-4.2.0.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: e8cb208ce2723481408b604b480183b6
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 84 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 632 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 4.1 SBU (using parallelism=4)
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Additional Downloads
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Optional additional modules: <a class="ulink" href=
                "https://github.com/opencv/opencv_contrib/archive/4.2.0/opencv_contrib-4.2.0.tar.gz">
                https://github.com/opencv/opencv_contrib/archive/4.2.0/opencv_contrib-4.2.0.tar.gz</a>
              </p>
            </li>
          </ul>
        </div>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            One additional file that starts with "ippicv" (integrated
            performance primitives) will be automatically downloaded during
            the cmake portion of the build procedure. This download is
            specific to the system architecture.
          </p>
        </div>
        <h3>
          opencv Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="cmake.html" title=
          "CMake-3.17.0">CMake-3.17.0</a> and <a class="xref" href=
          "unzip.html" title="UnZip-6.0">UnZip-6.0</a>
        </p>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="../multimedia/ffmpeg.html" title=
          "FFmpeg-4.2.2">FFmpeg-4.2.2</a>, <a class="xref" href=
          "../multimedia/gst10-plugins-base.html" title=
          "gst-plugins-base-1.16.2">gst-plugins-base-1.16.2</a>, <a class=
          "xref" href="../x/gtk3.html" title="GTK+-3.24.16">GTK+-3.24.16</a>,
          <a class="xref" href="jasper.html" title=
          "JasPer-2.0.14">JasPer-2.0.14</a>, <a class="xref" href=
          "libjpeg.html" title="libjpeg-turbo-2.0.4">libjpeg-turbo-2.0.4</a>,
          <a class="xref" href="libpng.html" title=
          "libpng-1.6.37">libpng-1.6.37</a>, <a class="xref" href=
          "libtiff.html" title="LibTIFF-4.1.0">LibTIFF-4.1.0</a>, <a class=
          "xref" href="libwebp.html" title="libwebp-1.1.0">libwebp-1.1.0</a>,
          <a class="xref" href="../multimedia/v4l-utils.html" title=
          "v4l-utils-1.18.0">v4l-utils-1.18.0</a>, and <a class="xref" href=
          "../multimedia/xine-lib.html" title=
          "xine-lib-1.2.10">xine-lib-1.2.10</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="apache-ant.html" title=
          "apache-ant-1.10.7">apache-ant-1.10.7</a>, <a class="xref" href=
          "doxygen.html" title="Doxygen-1.8.17">Doxygen-1.8.17</a>, <a class=
          "xref" href="java.html" title="Java-12.0.2">Java-12.0.2</a>,
          <a class="xref" href="python2.html" title=
          "Python-2.7.17">Python-2.7.17</a>, <a class="ulink" href=
          "https://developer.nvidia.com/cuda-zone">Cuda</a>, <a class="ulink"
          href="http://eigen.tuxfamily.org/">Eigen</a>, <a class="ulink"
          href="http://www.openexr.com/">OpenEXR</a>, <a class="ulink" href=
          "http://gcd.joewheaton.org/">GCD</a>, <a class="ulink" href=
          "http://www.gdal.org/">GDAL</a>, <a class="ulink" href=
          "https://www.jai.com/technology/interfaces">GigEVisionSDK</a>,
          <a class="ulink" href="http://jackaudio.org/">JACK</a>, <a class=
          "ulink" href=
          "http://sourceforge.net/projects/libdc1394/">libdc1394</a>,
          <a class="ulink" href="http://www.gphoto.org/">libgphoto2</a>,
          <a class="ulink" href="http://www.numpy.org/">NumPy</a>, <a class=
          "ulink" href="http://structure.io/openni">OpenNI</a>, <a class=
          "ulink" href="http://plantuml.sourceforge.net/">PlanetUML</a>,
          <a class="ulink" href=
          "http://www.1stvision.com/AVT-gige-camera-software-downloads.html">PvAPI</a>,
          <a class="ulink" href=
          "https://www.threadingbuildingblocks.org/">Threading Building
          Blocks (TBB)</a>, <a class="ulink" href=
          "http://unicap-imaging.org/">UniCap</a>, <a class="ulink" href=
          "http://www.vtk.org/">VTK - The Visualization Toolkit</a>, and
          <a class="ulink" href="http://www.ximea.com/">XIMEA</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/opencv">http://wiki.linuxfromscratch.org/blfs/wiki/opencv</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of opencv
        </h2>
        <p>
          If needed, unpack the additional modules package:
        </p>
        <pre class="userinput">
<kbd class="command">tar xf ../opencv_contrib-4.2.0.tar.gz</kbd>
</pre>
        <p>
          Install <span class="application">opencv</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">mkdir build &amp;&amp;
cd    build &amp;&amp;

cmake -DCMAKE_INSTALL_PREFIX=/usr      \
      -DCMAKE_BUILD_TYPE=Release       \
      -DENABLE_CXX11=ON                \
      -DBUILD_PERF_TESTS=OFF           \
      -DWITH_XINE=ON                   \
      -DBUILD_TESTS=OFF                \
      -DENABLE_PRECOMPILED_HEADERS=OFF \
      -DCMAKE_SKIP_RPATH=ON            \
      -DBUILD_WITH_DEBUG_INFO=OFF      \
      -Wno-dev  ..                     &amp;&amp;
make</kbd>
</pre>
        <p>
          The package does not come with an operable test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>-DWITH_XINE=ON</code></em>: This option
          instructs the make procedure to use <a class="xref" href=
          "../multimedia/xine-lib.html" title=
          "xine-lib-1.2.10">xine-lib-1.2.10</a>.
        </p>
        <p>
          <em class=
          "parameter"><code>-DENABLE_PRECOMPILED_HEADERS=OFF</code></em>:
          This option is needed for compatibiiity with gcc-6.1 and later.
        </p>
        <p>
          <code class=
          "option">-DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.2.0/modules</code>:
          instructs the build system to build additional modules.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">opencv_annotation,
              opencv_interactive-calibration, opencv_version,
              opencv_visualisation, and setup_vars_opencv4.sh</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libopencv_calib3d.so, libopencv_core.so,
              libopencv_dnn.so, libopencv_features2d.so, libopencv_flann.so,
              libopencv_gapi.so, libopencv_highgui.so,
              libopencv_imgcodecs.so, libopencv_imgproc.so, libopencv_ml.so,
              libopencv_objdetect.so, libopencv_photo.so,
              libopencv_stitching.so, libopencv_video.so, and
              libopencv_videoio.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/usr/include/opencv4
              /usr/lib/cmake/opencv4, /usr/share/opencv4, and
              /usr/share/java/opencv4</span>
            </div>
          </div>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-19 01:44:08 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="newt.html" title="newt-0.52.21">Prev</a>
          <p>
            newt-0.52.21
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="openjpeg2.html" title=
          "OpenJPEG-2.3.1">Next</a>
          <p>
            OpenJPEG-2.3.1
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="graphlib.html" title=
          "Chapter&nbsp;10.&nbsp;Graphics and Font Libraries">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
